#include "widget.h"
#include "ui_widget.h"
#include "thread.h"


Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    Thread* thread1 = new Thread(this);
    Thread* thread2 = new Thread(this);
    thread1->start();
    thread2->start();
}

Widget::~Widget()
{
    delete ui;
}

//void Widget::handle()
//{
//    int value = ui->lcdNumber->intValue();
//    value--;
//    ui->lcdNumber->display(value);
//}

//Widget::Widget(QWidget *parent)
//    : QWidget(parent)
//    , ui(new Ui::Widget)
//{
//    ui->setupUi(this);
//    connect(&thread,&Thread::notify,this,&Widget::handle);
//    thread.start();
//    thread.destroyed();
//}

//Widget::~Widget()
//{
//    delete ui;
//}

//void Widget::handle()
//{
//    int value = ui->lcdNumber->intValue();
//    value--;
//    ui->lcdNumber->display(value);
//}

